package com.itlong.cloud.noncore.operate;


import com.itlong.cloud.POJO.DTO.operate.OperateAssessFunctionDTO;
import com.itlong.cloud.POJO.VO.operate.OperateAssessFunctionVO;
import com.itlong.cloud.POJO.VO.operate.OperateGetRoleMenuVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      运营-报价系统资源菜单接口暴露
 * </desc>
 *
 * @createDate  2020/6/8
 */
@FeignClient("user-service")
public interface IOperateAssessFunctionServiceClient {

    /**
     * <desc>
     *      分页获取报价菜单
     * </desc>
     *
     * @param operateAssessFunctionDTO 报价菜单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/9
     */
    @PostMapping("/operate/system/assessFunction/getPage")
    Page<OperateAssessFunctionVO> getPage(@RequestBody OperateAssessFunctionDTO operateAssessFunctionDTO) throws Exception;

    /**
     * <desc>
     *      获取单个报价菜单
     * </desc>
     *
     * @param operateAssessFunctionDTO 报价菜单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/9
     */
    @PostMapping("/operate/system/assessFunction/getOne")
    OperateAssessFunctionVO getOne(@RequestBody OperateAssessFunctionDTO operateAssessFunctionDTO) throws Exception;

    /**
     * <desc>
     *      获取子节点
     * </desc>
     *
     * @param operateAssessFunctionDTO 报价菜单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/9
     */
    @PostMapping("/operate/system/assessFunction/getChild")
    List<OperateAssessFunctionVO> getChild(@RequestBody OperateAssessFunctionDTO operateAssessFunctionDTO) throws Exception;

    /**
     * <desc>
     *      更改菜单状态
     * </desc>
     *
     * @param operateAssessFunctionDTO 报价菜单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/9
     */
    @PostMapping("/operate/system/assessFunction/updateStatus")
    Integer updateStatus(@RequestBody OperateAssessFunctionDTO operateAssessFunctionDTO) throws Exception;

    /**
     * <desc>
     *      保存操作
     * </desc>
     *
     * @param operateAssessFunctionDTO 报价菜单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/9
     */
    @PostMapping("/operate/system/assessFunction/save")
    Integer save(@RequestBody OperateAssessFunctionDTO operateAssessFunctionDTO) throws Exception;

    /**
     * <desc>
     *      更新操作
     * </desc>
     *
     * @param operateAssessFunctionDTO 报价菜单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/9
     */
    @PostMapping("/operate/system/assessFunction/update")
    Integer update(@RequestBody OperateAssessFunctionDTO operateAssessFunctionDTO) throws Exception;


    /**
     * <desc>
     *      删除功能
     * </desc>
     *
     * @param operateAssessFunctionDTO 报价菜单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/16
     */
    @PostMapping("/operate/system/assessFunction/delete")
    Integer delete(@RequestBody OperateAssessFunctionDTO operateAssessFunctionDTO) throws Exception;

    /**
     * <desc>
     *      获取当前节点所有同级节点
     * </desc>
     *
     * @param parent
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/16
     */
    @PostMapping("/operate/system/assessFunction/getParentLevelFunctions")
    List<Map<String, Object>> getParentLevelFunctions(@RequestParam("parent") String parent) throws Exception;

    /**
     * <desc>
     *      获取角色菜单
     * </desc>
     *
     * @param roleId 角色id
     * @return
     * @Author Zhu.yj
     * @createDate  2020/6/22
     */
    @PostMapping("/operate/system/assessFunction/getRoleMenus")
    List<OperateGetRoleMenuVO> getRoleMenus(@RequestParam("roleId") String roleId);
}
